package org.permission.dao;

import java.io.Serializable;
import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface CommonDao<E,PK extends Serializable> {
	public void add(E entity);
	
	public void batchAdd(List<E> list);
	
	public void delete(PK id);
	
	public void batchDelete(PK[] ids);
	
	public void update(E entity);
	
	public E get(PK id);
	
	public List<E> getAll();
	
	public List<E> getList(@Param("start")int start,@Param("limit") int limit);
	
	public Integer getCount();
	
	public List<E> getConditionList(@Param("start")int start,@Param("limit") int limit,@Param("condition") E condition,@Param("colName") String colName,@Param("orderBy") String orderBy);
	
	public Integer getConditionCount(@Param("condition")E condition);
	
}









